<?php
	namespace Home\Model;
	use Think\Model;
	class AppraiseModel extends Model {
		/**
		 * 添加一个评价
		 */
		public function addAppraise($post) {
			return $this->add($post);
		}
		/**
		 * 根据id获取该id文章的评价
		 */
		public function getAppraiseDataById($id) {
			return $this->field('appraise.cre_time,appraise.content,user.userName,user.head')->join('user on appraise.user_id=user.id')->where("article_id =$id")->select();
		}
	}
